Skip to content

Add --version flag to the CLI#374

Merged
AndreyVMarkelov merged 1 commit into
mainfrom
feat/cli-version
Jul 13, 2026
Merged

Add --version flag to the CLI#374
AndreyVMarkelov merged 1 commit into
mainfrom
feat/cli-version

Conversation

@AndreyVMarkelov

@AndreyVMarkelov AndreyVMarkelov commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a stone --version flag and exposes the package version programmatically as stone.__version__. Useful for bug reports and scripting.

$ stone --version
stone 3.5.1

Changes

  • pyproject.toml — configures setuptools-scm to generate stone/_version.py from the release tag.
  • stone/__init__.py — exposes the generated version, with a 0.0.0.dev0 fallback for an unbuilt source tree.
  • stone/cli.py — adds a long-form --version argument; -v remains --verbose.
  • Tests — verifies --version exits successfully and that a generated version is honored in a source checkout.

Testing

  • Full test suite: 184 passed.
  • flake8: clean.
  • pylint: 10.00/10.
  • Wheel build includes the generated version module and reports the derived package version.

Expose the package version through stone.__version__ and add a --version flag for bug reports and scripting.

Generate a runtime version module with setuptools-scm for installed artifacts and fall back to a development version in source checkouts.
@AndreyVMarkelov AndreyVMarkelov merged commit a5213f2 into main Jul 13, 2026
11 checks passed
@AndreyVMarkelov AndreyVMarkelov deleted the feat/cli-version branch July 13, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants